/*
 * @Author: yangzonglong
 * @Date: 2020-06-15 14:31:30
 * @version: v1.0.0
 * @Descripttion: 
 * @LastEditors: yangzonglong
 * @LastEditTime: 2021-04-25 10:59:58
 * @Auditor: 
 */ 
// import { FormxControlTypes } from './../formx/data';

export const layout = {
  labelCol: { span: 4 },
  wrapperCol: { span: 20 },
};

export const columns = [
  { dataIndex: 'materialCode', width: 150, tooltip: true, ellipsis: true },
  { dataIndex: 'materialDesc', width: 150, tooltip: true, ellipsis: true },
  { dataIndex: 'materialTypeCode', width: 150 },
  { dataIndex: 'materialTypeName', width: 150 },
  { dataIndex: 'materialGroupCode', width: 150 },
  { dataIndex: 'standard', width: 150, ellipsis: true },
  { dataIndex: 'texture', width: 150 }
]

export const searchData = [
  { 
    name: 'materialTypeCode',
    type: "select",
    options: {
      url: '/bk/api/material/MaterialType/find', 
      fieldNames: { label: 'materialTypeName', value: 'materialTypeCode' } 
    }
  },
  { 
    name: 'materialAttributeCode',
    type: "select",
    options: {
      url: '/bk/api/material/MaterialAttribute/find', 
      fieldNames: { label: 'materialAttributeName', value: 'materialAttributeCode' } 
    }
  },
  { 
    name: 'materialGroupCode',
    type: "select",
    options: {
      url: '/bk/api/material/MaterialGroup/find', 
      fieldNames: { label: 'materialGroupName', value: 'materialGroupCode' } 
    }
  }
]

export const model = {
  title: '物料选择',
  columns,
  url: '/bk/api/material/Material/find',
  fieldNames: { label: 'label', value: 'value' },
  searchFields: [columns[0].dataIndex, columns[1].dataIndex],
  searchFieldsText: [columns[0].dataIndex, columns[1].dataIndex],
  advancedSearchFormItems: searchData
}